#!/usr/bin/bash

# single network
# conn_name=$(nmcli c s --active | grep ethernet | awk -F"  " '{print $1}')
# sudo nmcli con modify "$conn_name" ipv4.dns-options "single-request"
# sudo nmcli con mod "$conn_name" ipv4.ignore-auto-dns yes
# sudo nmcli con mod "$conn_name" ipv4.dns "223.5.5.5,223.6.6.6"
# nmcli con down "$conn_name"
# nmcli con up "$conn_name"
# sudo systemctl restart NetworkManager

echo 'prepend domain-name-servers 223.5.5.5;' | tee -a /etc/dhcp/dhclient.conf
systemctl restart networking.service
# <<COMMENT
# bash -c "$(curl -fsSL https://gitee.com/hevey88/install_script/raw/main/vm_linux_dns_option.sh)"
# COMMENT
# bash -c "$(wget https://gitee.com/hevey88/install_script/raw/main/vm_linux_dns_option.sh -O -) "
